#pragma once

#include <MyControls/Frame.h>
#include <MyControls/Panels.h>
#include <MyFC/ToolBar.h>
#include <MyControls/PEditor.h>
#include <MyControls/TimeControls.h>

#include "CXComp.h"
#include "CXView.h"
#include "CXTimeline.h"
#include "DisplayPanel.h"
#include "Resource.h"

class MainFrame : public My::Frame
{
	typedef My::Frame Base;
public:
	enum {
		ResourceID = IDR_MAINFRAME
	};
	typedef CXView ViewType;

public:
	MainFrame(CXComp &);

// Attributes
public:
	CXComp &			m_Comp;
	CXView				m_View;
	CXTimeline			m_Timeline;
	My::WidgetPanel		m_TimelinePanel;
	My::ToolBar			m_Tools;
	My::WidgetPanel		m_ToolPanel;
	My::PEditor			m_PEditor;
	My::WidgetPanel		m_PEditPanel;
	My::TimeControls	m_TimeControls;
	My::WidgetPanel		m_TimeControlsPanel;
	DisplayPanel		m_DisplayPanel;
	CFont				m_LargeFont;
// Operations
public:
	void OnSelectionChanged();
// Overrides
public:
	virtual void ProcessEvent(My::Event &);

// Implementation
public:
	virtual ~MainFrame();
public:
	virtual CXView & GetView()
		{ return m_View; }

// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
};


